<?php $defaultLanguage = Router::defaultLanguage();
            //$_queries = array('continue' => $this->request->here(false));
            $_queries='continue=%2Fvie%2Fadmin%2Fnode%2Fnode%2Flist_index%2F4.html';
        ?>
<?php foreach ($nodes as $node) : ?>                                            
    <tr>            
               
            <td>
                <a href="<?php echo $this->Html->url(array('plugin'=>'node','controller' => 'node', 'action' => 'edit', $node['Node']['node_type_id'], $node['Node']['id'], '?' => $_queries));?>"> 
                    <span class="wd-asideleft"><?php echo $node['Node']['title']; ?></span></a>
            </td>
        
        <td><span class="priority"><?php echo $node['Node']['field_priority']; ?></span></td>
               
            <td>
                <a href="#"> Dạy nấu ăn <?php //echo $node['NodeType']['name']; ?></a>
            </td>
            
        <td>
        
                <ul class="wd-laguage">
                    <?php
                        foreach (Configure::read('Languages') as $_language) {
                            if ($_language['code'] === $defaultLanguage) {
                                continue;
                            } 
                            if(empty($_language['path'])){
                                $flags = 'flags_default.png';                                                
                            }
                            else{$flags = $_language['path'];}                                                                                        
                        ?>
                        
                        <li><?php  echo $this->Html->link($this->Html->image('/img/' .$flags), array('plugin'=>'node','controller'=>'node','action' => 'translate', $node['Node']['id'], $_language['code'], '?' => $_queries), array(
                                    'class' => 'tip-top', 'escape' => false, 'title' => $_language['name']));?></li>           
                        <?php }?>
                </ul>
                  
        </td>
        
        <td>
            <ul class="wd-link-control">
                <li><a href="<?php echo $this->Html->url(array('plugin'=>'node','controller' => 'node', 'action' => 'edit', $node['Node']['node_type_id'], $node['Node']['id'], '?' => $_queries));?>" class="btn btn-mini">
                        <i class="icon-edit"></i> <?php echo __d('system','Edit');?></a></li>
                <li><a href="#<?php echo $node['Node']['id']?>" data-toggle="modal" class="btn btn-mini"><i class="icon-remove"></i> <?php echo __d('system','Delete');?></a></li>                            
            </ul>
        </td>
    </tr>

    <?php endforeach?>   